/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * NuGat-API named Chameleon developed by Simon De Baets to Verimag.
 *
 */


package chameleon.model.NuGatStructure;

import chameleon.gameSolver.NuGat.NuGatInterface;
import com.sun.jna.Pointer;

/**
 *
 * @author simon
 */
public abstract class NuGatStructure {

    private Pointer structure_;
    protected NuGatInterface nugat_;

    public NuGatStructure(Pointer structure, NuGatInterface nugat){
        structure_ = structure;
        nugat_ = nugat;
    }

    public Pointer ptr(){return structure_;}
    
    public boolean equals(NuGatStructure structure){        
        return this.ptr().equals(structure.ptr());
    }
    
    public boolean notNull(){
        if (this!=null)
            if (this.ptr()!=null)
                if(!this.ptr().equals(Pointer.NULL))
                    return true;
        return false;
    }
    
    public boolean isNull(){
        return !this.notNull();
    }
}
